#pragma once
#include <string>
using std::string;

class Shader
{
public:

   Shader(const char* vertexPath, const char* fragmentPath);

   ~Shader();

   void Use();

   unsigned int GetShaderProgram();

   void SetUniform(const string& uniformName, float x);
   void SetUniform(const string& uniformName, float x, float y);
   void SetUniform(const string& uniformName, float x, float y, float z);
   void SetUniform(const string& uniformName, float x, float y, float z, float m);
   void SetUniform(const string& uniformName, int x);
   void SetUniform(const string& uniformName, int x, int y);
   void SetUniform(const string& uniformName, int x, int y, int z);
   void SetUniform(const string& uniformName, int x, int y, int z, int m);

private:

   string vertexStr;
   string fragmentStr;
   const char* vertexShaderSrc;
   const char* fragmentShaderSrc;
   unsigned int shaderProgram;

   void CheckCompileErrors(unsigned int id, const string& type);

   unsigned int GetUniformLocation(const string& uniformName);
};

